package com.indusfo.spc.controller;

import com.indusfo.spc.aspect.SystemControllerLog;
import com.indusfo.spc.pojo.BatchScrapDetail;
import com.indusfo.spc.service.BatchScrapDetailService;
import com.indusfo.spc.vo.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/service/batchScrapDetail")
public class BatchScrapDetailController {

    @Autowired
    private BatchScrapDetailService batchScrapDetailService;

    /**
     * 查询
     *
     * @param
     * @return com.indusfo.spc.vo.JSONObject
     */
    @RequestMapping(value="/queryBatchScrapDetail")
    @SystemControllerLog(description="查询产品报废明细")
    @ResponseBody
    public JSONObject queryBatchScrapDetail(BatchScrapDetail batchScrapDetail) {

        JSONObject json = batchScrapDetailService.selectAll(batchScrapDetail);
        return json;

    }



    /**
     * 查询  排除数组中的数据
     *
     */
    @RequestMapping(value="/queryBatchList")
    @ResponseBody
    public JSONObject queryBatchList(BatchScrapDetail batchScrapDetail,Integer[] batchIds ) {
        JSONObject json = batchScrapDetailService.queryBatchList(batchScrapDetail,batchIds);
        return json;
    }
    
}
